
package com.yimixian.app.user;

import android.text.Editable;
import android.text.TextWatcher;

public class UserTextWatcher implements TextWatcher {

    private final Runnable mRunnable;

    public UserTextWatcher(Runnable runnable) {
        mRunnable = runnable;
    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {

    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {
        mRunnable.run();
    }

    @Override
    public void afterTextChanged(Editable s) {
        mRunnable.run();
    }
}
